class A:
    pass


a = A()

print(a.__class__)
print(type(a))
print(A.__class__)
print(type(A))


class F:

    def fun1(self):
        print('f,fun1...')


def fun2(self):
    print('f,fun2...')


Test = type('Test', (F,), {'x': 'name', 'fun2': fun2})
t = Test()
print(t)
print(type(t))
print(type(Test))
t.fun1()
print(t.x)
t.fun2()
